﻿@model IEnumerable<KCMS.BusinessLogic.Models.Product>

<table id="product-list">
    <tr>
    <th>
            Title
        </th>
         <th>
            Brend
        </th>
        <th>
            Article
        </th>
        <th>
            Price
        </th>
        <th>
            Published
        <th>
            MetaDescription
        </th>
        <th>
            MetaKeys
        </th>
        <th>
            Description
        </th>
        <th>
            Category
        </th>
        <th>
            Code
        </th>
        <th>
            Index
        </th>
        <th>
            DateOfCreate
        </th>
        <th>
            DateOfChange
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Brend.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Article)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>

        <td>
            @Html.DisplayFor(modelItem => item.Published)
        </td>
       
        <td>
            @Html.DisplayFor(modelItem => item.MetaDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MetaKeys)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Category.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Code)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Index)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateOfCreate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateOfChange)
        </td>
       
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })|
            @Html.ActionLink("AddSizes", "Index", "AllowableProductSize", new { productId=item.Id },null)
            @Html.ActionLink("AddPhoto", "CreateByProduct", "ProductImage", new { productId = item.Id }, null)
        </td>
    </tr>
}

</table>
